package com.star.spring.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

/**
 * 实体类
 *
 * @author 白豆五
 * @version 2023/04/4
 * @since JDK8
 */

@Data
@TableName(value = "t_user")
public class User {
    private Integer id;
    private String username;
    private String pwd;
    private Integer salary;//以分为单位,避免浮点运算精度丢失问题

    // 封装数据
    public void setSalary(Integer salary) {
        this.salary = salary * 100;
    }
}
